﻿@using Coralcode.Utils.Basic
@using CoralNode.Core.Entity.Enums
@using CoralNode.MvcClient.Contexts
@using CoralNode.MvcClient.Helper;
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>
        @CoralNodeContext.Current.ManageSite.Slogan-@CoralNodeContext.Current.ManageSite.Name
    </title>
    <link rel="stylesheet" type="text/css" href="/Themes/CoralAdmin/_misc/css/screen.css">
    <link rel="stylesheet" type="text/css" href="/Themes/CoralAdmin/_misc/css/main.css">
    <link rel="stylesheet" type="text/css" href="/Themes/CoralAdmin/_misc/scripts/upload/fineuploader.css">
    <link rel="stylesheet" type="text/css" href="/Themes/CoralAdmin/_misc/scripts/jqueryUI/css/ui-lightness/jquery-ui-1.10.3.custom.min.css">
    <link rel="stylesheet" type="text/css" href="/Themes/CoralAdmin/_misc/scripts/jqueryUI/css/jquery-ui-timepicker-addon.css">
    <link rel="shortcut icon" href="~/Themes/GodMother/_misc/images/favicon.ico" />
    <script src="/Themes/CoralAdmin/_misc/scripts/jquery-1.7.2.min.js"> </script>
    <script src="/Themes/CoralAdmin/_misc/scripts/jqueryUI/jquery-ui-1.10.3.custom.min.js"> </script>
    <script src="/Themes/CoralAdmin/_misc/scripts/jqueryUI/jquery-ui-timepicker-addon.js"> </script>
    <script src="/Themes/CoralAdmin/_misc/scripts/ueditor/ueditor.all.js"> </script>
    <script src="/Themes/CoralAdmin/_misc/scripts/upload/AjaxUpload.js"> </script>
    <script src="/Themes/CoralAdmin/_misc/scripts/ueditor/ueditor.config.js"> </script>
</head>
<body>
    <!--head-->

    <div id="phead">
        <span class="logo pr_2"><a href="/m/home" style="background-image:url(@Html.ImageUrl(CoralNodeContext.Current.ManageSite.Logo))">@CoralNodeContext.Current.ManageSite.Name</a></span>
        <div class="nav_main" data-js="nav_main">
            <ul>
                <li class="dropdown">
                    <a href="/m">@ViewBag.WorkbenchContext.Name <span class="ico ico_dropdown"></span></a>
                    <div>
                        <dl class="changeSite">
                            @foreach (dynamic item in @ViewBag.AllWorkbenchList)
                            {
                                if (item.Id != 1)
                                {
                                    <dd><a itemid="@item.Id" href="/m/common/ChangeSite">@item.Name</a></dd>
                                }
                            }
                        </dl>
                    </div>
                </li>
                @{
                    string module = (ViewData["Module"] ?? "").ToString();
                }
                @helper ShowCurrent(string module, string value)
{
    if (module.Equals(value, StringComparison.CurrentCultureIgnoreCase))
    {
        @String.Format("class=current")
        ;
    }
}
                @if (@ViewBag.WorkbenchContext.Status == SiteEnums.SiteStatus.Management)
                {
                    <li @ShowCurrent(module, "quick")><a href="/m/quickSetting">快速建站</a></li>
                    <li @ShowCurrent(module, "site")><a href="/m/site">网站管理</a></li>
                    <li @ShowCurrent(module, "gather")><a href="/m/gather">内容订阅</a></li>
                    <li @ShowCurrent(module, "user")><a href="/m/user">用户管理</a></li>
                    <li @ShowCurrent(module, "application")><a href="/m/Application">应用管理</a></li>
                    <li @ShowCurrent(module, "sitesetting")><a href="/m/sitesetting">系统设置</a></li>
                    @*<li @ShowCurrent(module, "statistic")><a href="/m/statistic">网站统计</a></li>*@
                }
                else
                {
                    <li @ShowCurrent(module, "node")><a href="/m/node">内容管理</a></li>
                    @*<li @ShowCurrent(module, "gather")><a href="/m/gather">内容采集</a></li>
                        <li @ShowCurrent(module, "prototype")><a href="/m/prototype">内容设计</a></li>*@
                    @*<li @ShowCurrent(module, "file")><a href="/m/file">文件管理</a></li>*@
                    @*<li @ShowCurrent(module, "menu")><a href="/m/menu">菜单设计</a></li>*@
                    <li @ShowCurrent(module, "statistic")><a href="/m/statistic">访问统计</a></li>
                    @*<li @ShowCurrent(module, "sitesetting")><a href="/m/sitesetting">网站设置</a></li>*@
                    if (ViewBag.WorkbenchContext.HasWechat)
                    {
                        <li @ShowCurrent(module, "msg")><a href="/m/w/listReceiveMsg">微信消息管理</a></li>
                        <li @ShowCurrent(module, "wechatSystem")><a href="/m/w/listMenu">微信系统管理</a></li>
                    }
                }
            </ul>

        </div>
        <div id="admin_info">
            <a class="curr">@ViewBag.UserContext.Name<span class="ico ico_dropdown"></span></a>
            <div class="show">
                <ul>
                    <li>
                        <a target="_blank" href="/@CoralNodeContext.Current.Workbench.Hosts">网站首页</a>
                    </li>
                    <li><a class="js-ajax-post" href="/m/common/UpdateCache">更新缓存</a></li>
                    @*<li><a class="js-ajax-post" href="/m/common/updateStaticPage?siteId=@CoralNodeContext.Current.Workbench.Id">更新静态页</a></li>
                        <li><a id="cancel_login" href="/m/passport/CancelAutoLogin">取消自动登录</a></li>*@
                    @if (!CoralNodeContext.Current.IsDookaySuper())
                    {
                        @*<li><a target="_blank" href="/m/home/accountsetting">账户设置</a></li>*@
                    }
                    <li><a target="_blank" href="/m/home/accountsetting">修改密码</a></li>
                    @*<li><a target="_blank" href="javascript:void(0)">操作日志</a></li>
                        <li><a target="_blank" href="/m/about/help">帮助中心</a></li>*@
                    <li><a href="/m/passport/logout">安全退出</a></li>
                </ul>
            </div>
        </div>
    </div>
    @RenderBody()
    <!--other-->
    <div id="changeSiteMask" style="filter: alpha(opacity=40);"></div>

    <div id="loadingMask_left">
        <div></div>
        <span>数据加载中...</span>
    </div>
    <div id="loader">
        <span class="loader_1">
            <!--loader1~3-->
            <i>系统执行中...</i>
        </span>
    </div>
    <div id="tooltip"></div>
    <div class="loading" style="z-index: 100; width: 100%; margin: 0 auto; position: absolute;
        text-align: center; top: 340px; display: none">
        <img src="/Themes/CoralAdmin/_misc/images/loading.gif" />
    </div>
    <script src="/Themes/CoralAdmin/_misc/scripts/jquery.plugin.js"> </script>
    <script src="/Themes/CoralAdmin/_misc/scripts/jquery.app.js"> </script>
</body>
</html>
